package com.cy.pj.notice.dao.impl;

import com.cy.pj.notice.dao.SysNoticeDao;
import com.cy.pj.notice.pojo.SysNotice;
import org.apache.ibatis.session.SqlSession;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

//@Repository
public class SysNoticeDaoImpl implements SysNoticeDao {

    @Autowired
    private SqlSession sqlSession;


    @Override
    public List<SysNotice> selectNotices(SysNotice sysNotice) {
        //key
       // String statement = "com.cy.pj.notice.dao.SysNoticeDao.selectNotices";
        String namespace = this.getClass().getInterfaces()[0].getName();
        String methodName = Thread.currentThread().getStackTrace()[1].getMethodName();
        String statement = namespace;
        List<SysNotice> list = sqlSession.selectList(statement,sysNotice);

        return list;
    }

    @Override
    public int deleteById(Long... id) {
        return 0;
    }

    @Override
    public int insertNotice(SysNotice entity) {
        return 0;
    }

    @Override
    public SysNotice findById(Long id) {
        return null;
    }

    @Override
    public int updateNotice(SysNotice newNotice) {
        return 0;
    }
}
